# -*- encoding: utf-8 -*-
'''
@File    :   5.py
@Time    :   2022/11/09 12:42:47
@Author  :   Cms 
@Version :   1.0
@Contact :   2267000140@qq.com
@WebSite    :   www.baidu.com
'''

# here put the import lib


# 5  写函数，检查传入字典的每一个value长度，如果大于2，那么仅保留前两个长度的内容，并将新内容返回给调用者;
def myfunc(arg1):
    for i in arg1:
        str1 = str(arg1[i])
        arg1[i] = str1[0:2]
    return arg1
dict1 = {"a":"123","b":"23456","c":"3456","d":"456789"}

print(myfunc(dict1))